package com.you.swagger.service.impl;

import com.you.swagger.controller.IUserInterface;
import com.you.swagger.controller.ProxyUser;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Controller;

/**
 * @Description
 * @Author yough
 * @Version V1.0.0
 * @Since 1.0
 * @Date 2021/1/12
 */
@Controller
public class MyFactoryBean implements FactoryBean {
    @Override
    public Object getObject() throws Exception {
        IUserInterface userInterface = (IUserInterface) new ProxyUser().getProxy();
        return userInterface;
    }

    @Override
    public Class<?> getObjectType() {
        return IUserInterface.class;
    }
}
